from django.contrib import admin
from django.urls import path,include
from web.views import index,cart,orders

urlpatterns = [
    path('',index.index,name='index'),

    path('login',index.login,name='web_login'),  #加载登录表单
    path('dologin',index.dologin,name='web_dologin'), #执行登录
    path('logout',index.logout,name='web_logout'), #退出
    path('verify',index.verify,name='web_verify'), #输出验证码

    path('web/',include([
        path('',index.webindex,name='web_index'),

        path('cart/add/<str:pid>',cart.add,name='web_cart_add'),
        path('cart/delete/<str:pid>',cart.delete,name='web_cart_delete'),
        path('cart/clear',cart.clear,name='web_cart_clear'),
        path('cart/change',cart.change,name='web_cart_change'),

        path('orders/insert',orders.insert,name='web_orders_insert'),
        path('orders/<int:pagIndex>',orders.index,name='web_orders_index'),
        path('orders/detail',orders.detail,name='web_orders_detail'),
        path('orders/status',orders.status,name='web_orders_status'),

    ]))
]

#
